package com.ytf.test.fourth;

/**
 * @author: YTF
 * @date: 2024/9/14 17:28
 * @version: 1.0
 * @description:
 */
public class IfElse2 {
    public static void main(String[] args) {
        System.out.println(test(10,5));
        System.out.println(test(5,10));
        System.out.println(test(5,5));
        /**
         * Output:
         * 1
         * -1
         * 0
         */
    }

    private static int test(int i, int i1) {
        if (i>i1){
            return  +1;
        }else if (i<i1){
            return  -1;
        }else{
            return  0;
        }
    }
}
